home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3798 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.4 KB

  1. Path: Norway.EU.net!usenet
  2. From: patrick.hanevold@login.eunet.no (Patrick Hanevold)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: doubling pixels horizontally
  5. Date: 24 Feb 1996 17:02:39 GMT
  6. Organization: EUnet Norway
  7. Message-ID: <2637.6627T383T87@login.eunet.no>
  8. References: <4f4ibc$gl9@news.cs.tu-berlin.de> <591.6610T1165T2102@login.eunet.no><1045.6611T753T2256@vip.cybercity.dk><4faoe1$47@sunsystem5.informatik.tu-muenchen.de><2991.6612T1034T625@vip.cybercity.dk><576.6613T1070T1730@login.eunet.no><1257.6614T57T922@vip.cybercity.dk><1982.6617T1096T103@ifi.uio.no><4gbjg3$104@sunsystem5.informatik.tu-muenchen.de><4518.6625T1142T92@ifi.uio.no>
  9.     <5073.6626T469T1290@login.eunet.no> <2824.6626T859T1819@ifi.uio.no>
  10. NNTP-Posting-Host: pc8.asker-pm2-1.eunet.no
  11. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  12.  
  13.  
  14. >>Like using structures. :)
  15. >Yes, that's good! :)
  16. But not good enough for you? :)
  17. Well.. you have used more structures latly.
  18.  
  19. >>>[..........]
  20. >>>mf256genhi:
  21. >>>   move.w d3,(a0)+ : addq.w #2,d3 : move.l d0,(a0)+  ;store hiwd ! -2(a0)
  22. >>>   move.w d3,-2(a0) : addq.w #2,d3 : move.w d0,(a0)+ ;store lowd
  23. >>>;every 2nd plane same data
  24. >>>   move.w d3,(a0)+ : addq.w #2,d3 : move.l d0,(a0)+  ;store hiwd ! -2(a0)
  25. >>>   move.w d3,-2(a0) : addq.w #2,d3 : move.w d0,(a0)+ ;store lowd
  26. >>>[...]
  27. >>>   move.l #$00e1fffe,d4 : or.l d2,d4           ;WAS: 00df
  28. >>>   movem.l (sp)+,d0-d7/a1-a6 ;a0=(ptr)copl
  29. >>>   rts
  30. >>Whow! What a mess. :)
  31. >I don't think you are the only one which agree's about that! ;)
  32. Maby resourcing would be easyer? :)
  33. Hmm.. hope I/we dont make anyone angry.
  34.  
  35. >>He forgot that it was 2xn
  36. >He probably did.
  37.  
  38. >>Hmm.. Yes you do. Its tha same locker we have. Exept we MAY have found a
  39. >>solution. Guess it will lock when I implement it in our world engine. :)
  40. >Ohh..like you did! I thought it was that the CPU locked while blitting.
  41.  
  42. >There is the solution(not to you, but the guy with the problem)
  43.  
  44. >If you set a flag in CleanUp: and are polling this flag with CPU to see if
  45. >the blitter is finish. It might never finish because you task uses all the
  46. >CPU- time. and CleanUp is never run.
  47.  
  48. >Don't do this:
  49.  
  50. >.QCleanup:
  51. >        move.l  #-1,_BlitterIsDone
  52. >        moveq   #0,d0
  53. >        rts
  54.  
  55. >and this
  56.  
  57. >while(!BlitterIsDone);      //infinite wait loop.
  58.  
  59. >------------------------------------------------------
  60. >Send a signal instead!
  61.  
  62. >Here is my code. (It works!)
  63.  
  64. >.QCleanUp:
  65. >        move.l  #-1,_BlitterIsDone
  66. >        movem.l d0-a6,-(sp)
  67. >        move.l  _BltPort,a0
  68. >        moveq.l #0,d0
  69. >        move.b  MP_SIGBIT(a0),d1
  70. >        bset    d1,d0
  71. >        move.l  4.w,a6
  72. >        move.l  _Task,a1
  73. >        CALL    Signal(a6)
  74. >        movem.l (sp)+,d0-a6
  75.  
  76. >        moveq   #0,d0
  77. >        rts
  78.  
  79. >And this:
  80.  
  81. >while(!BlitterIsDone)
  82. >  Wait(1l<<(BltPort->mp_SigBit));
  83.  
  84.  
  85. >Now your task will be in wait-state until the blitter is finished.
  86.  
  87. >Problem solved! :)
  88.  
  89. Well, why do that peace of code get executed then, and not the other one?
  90. Ahh... now i know. Its the damn wait loop that locks the task, so the task
  91. gets bussy in the wait loop, and never gets to the cleanup routine.
  92. I stil think its a bug in QBlit. It should be called from from the blit
  93. interrupt. Waiting with a test loop insnt that OS friendly though.
  94. There is a solution though, with out signaling the task, but who wants to
  95. do that anyway.
  96.  
  97. <sb>Patrick Hanevold - Virtual Reality developer
  98. <sb>patrick.hanevold@login.eunet.no
  99. <sb>Amiga and official Be developer
  100.  
  101.